/*
 Navicat Premium Data Transfer

 Source Server         : localhost_3306
 Source Server Type    : MySQL
 Source Server Version : 80026
 Source Host           : localhost:3306
 Source Schema         : scapi

 Target Server Type    : MySQL
 Target Server Version : 80026
 File Encoding         : 65001

 Date: 23/11/2021 21:39:10
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for sys_config
-- ----------------------------
DROP TABLE IF EXISTS `sys_config`;
CREATE TABLE `sys_config` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `key` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '键',
  `value` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '值',
  `category` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '分类',
  `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '标题',
  `type` int NOT NULL COMMENT '类型',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  `create_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `update_user_id` bigint NOT NULL DEFAULT '0' COMMENT '更新人ID',
  `update_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新日期',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '是否删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='系统设置';

-- ----------------------------
-- Records of sys_config
-- ----------------------------
BEGIN;
INSERT INTO `sys_config` VALUES (1, 'name', 'SCUI', 'sys', '系统名称', 1, 1, '2021-11-19 14:26:29', 0, '2021-11-19 14:26:29', 0);
INSERT INTO `sys_config` VALUES (2, 'logoUrl', '', 'sys', 'LogoUrl', 1, 1, '2021-11-19 14:29:33', 0, '2021-11-19 14:29:33', 0);
INSERT INTO `sys_config` VALUES (3, 'login', '0', 'sys', '登录开关', 1, 1, '2021-11-19 14:29:33', 0, '2021-11-19 14:29:33', 0);
INSERT INTO `sys_config` VALUES (4, 'passwordRules', '^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,20}$', 'sys', '密码验证规则', 1, 1, '2021-11-19 14:29:33', 0, '2021-11-19 14:29:33', 0);
INSERT INTO `sys_config` VALUES (5, 'copyright', '@SCUI', 'sys', '版权信息', 1, 1, '2021-11-19 14:29:33', 0, '2021-11-19 14:29:33', 0);
INSERT INTO `sys_config` VALUES (6, 'open', '0', 'sms', 'LogoUrl', 2, 1, '2021-11-19 14:31:09', 0, '2021-11-19 14:31:09', 0);
INSERT INTO `sys_config` VALUES (7, 'appKey', '', 'sms', '登录开关', 2, 1, '2021-11-19 14:31:09', 0, '2021-11-19 14:31:09', 0);
INSERT INTO `sys_config` VALUES (8, 'secretKey', '', 'sms', '版权信息', 2, 1, '2021-11-19 14:31:09', 0, '2021-11-19 14:31:09', 0);
INSERT INTO `sys_config` VALUES (9, 'file_serve', 'https://file.scui.com', 'url', '文件服务器地址', 3, 1, '2021-11-19 14:32:51', 0, '2021-11-19 14:32:51', 0);
INSERT INTO `sys_config` VALUES (10, 'cloud_url', '', 'url', '客户端地址', 3, 1, '2021-11-19 14:32:51', 0, '2021-11-19 14:32:51', 0);
INSERT INTO `sys_config` VALUES (11, 'crm_url', '', 'url', 'CRM地址', 3, 1, '2021-11-19 14:32:51', 0, '2021-11-19 14:32:51', 0);
INSERT INTO `sys_config` VALUES (12, 'autoSwitch', '0', 'user', '自动判断boolean类型', 3, 1, '2021-11-19 14:32:51', 0, '2021-11-19 14:32:51', 0);
COMMIT;

-- ----------------------------
-- Table structure for sys_dic_data
-- ----------------------------
DROP TABLE IF EXISTS `sys_dic_data`;
CREATE TABLE `sys_dic_data` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `parent_id` bigint NOT NULL COMMENT '父ID',
  `key` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '键值',
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '名称',
  `sort` int NOT NULL DEFAULT '1' COMMENT '排序',
  `yx` tinyint(1) DEFAULT '1' COMMENT '是否有效',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  `create_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `update_user_id` bigint NOT NULL DEFAULT '0' COMMENT '更新人ID',
  `update_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新日期',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '是否删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='角色表';

-- ----------------------------
-- Records of sys_dic_data
-- ----------------------------
BEGIN;
INSERT INTO `sys_dic_data` VALUES (2, 1, '1', '发布通知', 1, 1, 1, '2021-11-21 17:45:53', 0, '2021-11-21 17:45:53', 0);
INSERT INTO `sys_dic_data` VALUES (3, 1, '2', '转发通知', 1, 1, 1, '2021-11-21 17:45:53', 0, '2021-11-21 17:45:53', 0);
INSERT INTO `sys_dic_data` VALUES (4, 1, '3', '事务通知', 1, 1, 1, '2021-11-21 17:45:53', 0, '2021-11-21 17:45:53', 0);
COMMIT;

-- ----------------------------
-- Table structure for sys_dic_type
-- ----------------------------
DROP TABLE IF EXISTS `sys_dic_type`;
CREATE TABLE `sys_dic_type` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `parent_id` bigint NOT NULL DEFAULT '0' COMMENT '父ID',
  `code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '编码',
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '名称',
  `sort` int NOT NULL DEFAULT '1' COMMENT '排序',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  `create_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `update_user_id` bigint NOT NULL DEFAULT '0' COMMENT '更新人ID',
  `update_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新日期',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '是否删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='角色表';

-- ----------------------------
-- Records of sys_dic_type
-- ----------------------------
BEGIN;
INSERT INTO `sys_dic_type` VALUES (1, 0, 'notice', '通知类型', 1, 1, '2021-11-21 17:40:34', 0, '2021-11-21 17:40:34', 0);
INSERT INTO `sys_dic_type` VALUES (2, 0, 'sex', '性别', 1, 1, '2021-11-21 17:40:34', 0, '2021-11-21 17:40:34', 0);
INSERT INTO `sys_dic_type` VALUES (3, 0, 'menuCategory', '菜单类型', 1, 1, '2021-11-21 17:40:34', 0, '2021-11-21 17:40:34', 0);
INSERT INTO `sys_dic_type` VALUES (4, 0, 'userType', '用户类型', 1, 1, '2021-11-21 17:40:34', 0, '2021-11-21 17:40:34', 0);
INSERT INTO `sys_dic_type` VALUES (5, 4, 'userTypePC', 'Desktop', 1, 1, '2021-11-21 17:40:34', 0, '2021-11-21 17:40:34', 0);
INSERT INTO `sys_dic_type` VALUES (6, 4, 'userTypeAPP', 'Mobile', 1, 1, '2021-11-21 17:40:34', 0, '2021-11-21 17:40:34', 0);
COMMIT;

-- ----------------------------
-- Table structure for sys_log
-- ----------------------------
DROP TABLE IF EXISTS `sys_log`;
CREATE TABLE `sys_log` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `cip` varchar(50) COLLATE utf8mb4_general_ci NOT NULL,
  `code` int NOT NULL,
  `level` varchar(50) COLLATE utf8mb4_general_ci NOT NULL,
  `name` varchar(50) COLLATE utf8mb4_general_ci NOT NULL,
  `time` datetime NOT NULL,
  `type` varchar(10) COLLATE utf8mb4_general_ci NOT NULL,
  `url` varchar(50) COLLATE utf8mb4_general_ci NOT NULL,
  `user` varchar(50) COLLATE utf8mb4_general_ci NOT NULL,
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  `create_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `update_user_id` bigint NOT NULL DEFAULT '0' COMMENT '更新人ID',
  `update_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新日期',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '是否删除',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='模版表';

-- ----------------------------
-- Records of sys_log
-- ----------------------------
BEGIN;
INSERT INTO `sys_log` VALUES (1, '195.176.176.29', 200, 'warn', '用户登录\"', '2021-11-23 13:25:27', 'POST', '/oauth/token', '夏娜', 1, '2021-11-23 21:26:21', 0, '2021-11-23 21:26:21', 0);
COMMIT;

-- ----------------------------
-- Table structure for sys_menu
-- ----------------------------
DROP TABLE IF EXISTS `sys_menu`;
CREATE TABLE `sys_menu` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `parent_id` bigint NOT NULL COMMENT '上级菜单',
  `name` varchar(50) COLLATE utf8mb4_general_ci NOT NULL COMMENT '别名',
  `path` varchar(50) COLLATE utf8mb4_general_ci NOT NULL COMMENT '路由地址',
  `redirect` varchar(50) COLLATE utf8mb4_general_ci NOT NULL COMMENT '重定向',
  `component` varchar(50) COLLATE utf8mb4_general_ci NOT NULL COMMENT '视图',
  `active` int NOT NULL COMMENT '菜单高亮',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  `create_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `update_user_id` bigint NOT NULL DEFAULT '0' COMMENT '更新人ID',
  `update_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新日期',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '是否删除',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='菜单表';

-- ----------------------------
-- Records of sys_menu
-- ----------------------------
BEGIN;
INSERT INTO `sys_menu` VALUES (1, 0, 'home', '/home', '', '', 0, 1, '2021-10-30 13:32:54', 0, '2021-10-30 13:32:54', 0);
INSERT INTO `sys_menu` VALUES (2, 1, 'dashboard', '/dashboard', '', 'home', 0, 1, '2021-10-30 13:32:54', 0, '2021-10-30 13:32:54', 0);
INSERT INTO `sys_menu` VALUES (3, 1, 'userCenter', '/userCenter', '', 'userCenter', 0, 1, '2021-10-30 13:32:54', 0, '2021-10-30 13:32:54', 0);
INSERT INTO `sys_menu` VALUES (4, 0, 'setting', '/setting', '', '', 0, 1, '2021-10-30 13:32:54', 0, '2021-10-30 13:32:54', 0);
INSERT INTO `sys_menu` VALUES (5, 4, 'system', '/setting/system', '', 'setting/system', 0, 1, '2021-10-30 13:32:54', 0, '2021-10-30 13:32:54', 0);
INSERT INTO `sys_menu` VALUES (6, 4, 'user', '/setting/user', '', 'setting/user', 0, 1, '2021-10-30 13:32:54', 0, '2021-10-30 13:32:54', 0);
INSERT INTO `sys_menu` VALUES (7, 4, 'role', '/setting/roled', '', 'setting/role', 0, 1, '2021-10-30 13:32:54', 0, '2021-10-30 13:32:54', 0);
INSERT INTO `sys_menu` VALUES (8, 4, 'dic', '/setting/dic', '', 'setting/dic', 0, 1, '2021-10-30 13:32:54', 0, '2021-10-30 13:32:54', 0);
INSERT INTO `sys_menu` VALUES (9, 4, 'tableSetting', '/setting/table', '', 'setting/table', 0, 1, '2021-10-30 13:32:54', 0, '2021-10-30 13:32:54', 0);
INSERT INTO `sys_menu` VALUES (10, 4, 'settingMenu', '/setting/menu', '', 'setting/menu', 0, 1, '2021-10-30 13:32:54', 0, '2021-10-30 13:32:54', 0);
INSERT INTO `sys_menu` VALUES (11, 4, 'task', '/setting/task', '', 'setting/task', 0, 1, '2021-10-30 13:32:54', 0, '2021-10-30 13:32:54', 0);
INSERT INTO `sys_menu` VALUES (12, 4, 'log', '/setting/log', '', 'setting/log', 0, 1, '2021-10-30 13:32:54', 0, '2021-10-30 13:32:54', 0);
COMMIT;

-- ----------------------------
-- Table structure for sys_menu_api
-- ----------------------------
DROP TABLE IF EXISTS `sys_menu_api`;
CREATE TABLE `sys_menu_api` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `menu_id` bigint NOT NULL COMMENT '菜单ID',
  `code` varchar(50) COLLATE utf8mb4_general_ci NOT NULL COMMENT '标识',
  `url` varchar(100) COLLATE utf8mb4_general_ci NOT NULL COMMENT 'Api url',
  PRIMARY KEY (`id`),
  KEY `menu_id` (`menu_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='菜单接口权限';

-- ----------------------------
-- Records of sys_menu_api
-- ----------------------------
BEGIN;
INSERT INTO `sys_menu_api` VALUES (1, 1, 'code', 'url');
COMMIT;

-- ----------------------------
-- Table structure for sys_menu_meta
-- ----------------------------
DROP TABLE IF EXISTS `sys_menu_meta`;
CREATE TABLE `sys_menu_meta` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `menu_id` bigint NOT NULL COMMENT '菜单ID',
  `color` varchar(50) COLLATE utf8mb4_general_ci NOT NULL COMMENT '颜色',
  `hidden` tinyint(1) NOT NULL COMMENT '隐藏菜单',
  `hidden_breadcrumb` tinyint(1) NOT NULL COMMENT '隐藏面包屑',
  `icon` varchar(50) COLLATE utf8mb4_general_ci NOT NULL COMMENT '菜单图标',
  `title` varchar(50) COLLATE utf8mb4_general_ci NOT NULL COMMENT '显示名称',
  `type` int NOT NULL COMMENT '类型',
  `affix` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否固定',
  PRIMARY KEY (`id`),
  KEY `menu_id` (`menu_id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='菜单路由表';

-- ----------------------------
-- Records of sys_menu_meta
-- ----------------------------
BEGIN;
INSERT INTO `sys_menu_meta` VALUES (1, 1, '', 0, 0, 'el-icon-eleme-filled', '首页', 1, 0);
INSERT INTO `sys_menu_meta` VALUES (2, 2, '', 0, 0, 'el-icon-menu', '控制台', 1, 1);
INSERT INTO `sys_menu_meta` VALUES (3, 3, '', 0, 0, 'el-icon-user', '个人信息', 1, 0);
INSERT INTO `sys_menu_meta` VALUES (4, 4, '', 0, 0, 'el-icon-setting', '配置', 1, 0);
INSERT INTO `sys_menu_meta` VALUES (5, 5, '', 0, 0, 'el-icon-tools', '系统设置', 1, 0);
INSERT INTO `sys_menu_meta` VALUES (6, 6, '', 0, 0, 'el-icon-user-filled', '用户管理', 1, 0);
INSERT INTO `sys_menu_meta` VALUES (7, 7, '', 0, 0, 'el-icon-notebook', '角色管理', 1, 0);
INSERT INTO `sys_menu_meta` VALUES (8, 8, '', 0, 0, 'el-icon-document', '字典管理', 1, 0);
INSERT INTO `sys_menu_meta` VALUES (9, 9, '', 0, 0, 'el-icon-scale-to-original', '表格列管理', 1, 0);
INSERT INTO `sys_menu_meta` VALUES (10, 10, '', 0, 0, 'el-icon-fold', '菜单管理', 1, 0);
INSERT INTO `sys_menu_meta` VALUES (11, 11, '', 0, 0, 'el-icon-alarm-clock', '计划任务', 1, 0);
INSERT INTO `sys_menu_meta` VALUES (12, 12, '', 0, 0, 'el-icon-warning', '系统日志', 1, 0);
COMMIT;

-- ----------------------------
-- Table structure for sys_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_role`;
CREATE TABLE `sys_role` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `parent_id` bigint NOT NULL COMMENT '父ID',
  `label` varchar(50) COLLATE utf8mb4_general_ci NOT NULL,
  `alias` varchar(50) COLLATE utf8mb4_general_ci NOT NULL,
  `sort` int NOT NULL,
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  `create_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `update_user_id` bigint NOT NULL DEFAULT '0' COMMENT '更新人ID',
  `update_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新日期',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '是否删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='角色表';

-- ----------------------------
-- Records of sys_role
-- ----------------------------
BEGIN;
INSERT INTO `sys_role` VALUES (1, 0, '超级管理员', 'SA', 1, 1, '2021-11-06 20:23:40', 0, '2021-11-06 20:23:40', 0);
COMMIT;

-- ----------------------------
-- Table structure for sys_role_menu
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_menu`;
CREATE TABLE `sys_role_menu` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `role_id` bigint NOT NULL COMMENT '角色ID',
  `menu_id` bigint NOT NULL COMMENT '菜单ID',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `role_id` (`role_id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='菜单接口权限';

-- ----------------------------
-- Records of sys_role_menu
-- ----------------------------
BEGIN;
INSERT INTO `sys_role_menu` VALUES (1, 1, 1);
INSERT INTO `sys_role_menu` VALUES (2, 1, 2);
INSERT INTO `sys_role_menu` VALUES (3, 1, 3);
INSERT INTO `sys_role_menu` VALUES (4, 1, 4);
INSERT INTO `sys_role_menu` VALUES (5, 1, 5);
INSERT INTO `sys_role_menu` VALUES (6, 1, 6);
INSERT INTO `sys_role_menu` VALUES (7, 1, 7);
INSERT INTO `sys_role_menu` VALUES (8, 1, 8);
INSERT INTO `sys_role_menu` VALUES (9, 1, 9);
INSERT INTO `sys_role_menu` VALUES (10, 1, 10);
INSERT INTO `sys_role_menu` VALUES (11, 1, 11);
INSERT INTO `sys_role_menu` VALUES (12, 1, 12);
COMMIT;

-- ----------------------------
-- Table structure for sys_table
-- ----------------------------
DROP TABLE IF EXISTS `sys_table`;
CREATE TABLE `sys_table` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `code` varchar(50) COLLATE utf8mb4_general_ci NOT NULL COMMENT '标识',
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '表格名称',
  `remote_filter` tinyint(1) NOT NULL DEFAULT '1' COMMENT '远程过滤',
  `remote_sort` tinyint(1) NOT NULL DEFAULT '1' COMMENT '远程排序',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  `create_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `update_user_id` bigint NOT NULL DEFAULT '0' COMMENT '更新人ID',
  `update_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新日期',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '是否删除',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='表格列管理';

-- ----------------------------
-- Records of sys_table
-- ----------------------------
BEGIN;
INSERT INTO `sys_table` VALUES (1, 'userList', '用户列表', 1, 1, 1, '2021-11-23 20:14:49', 0, '2021-11-23 20:14:49', 0);
COMMIT;

-- ----------------------------
-- Table structure for sys_table_column
-- ----------------------------
DROP TABLE IF EXISTS `sys_table_column`;
CREATE TABLE `sys_table_column` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `table_id` bigint NOT NULL,
  `filter` tinyint NOT NULL DEFAULT '1' COMMENT '过滤项',
  `filters` text COLLATE utf8mb4_general_ci COMMENT '过滤项',
  `fixed` tinyint(1) NOT NULL DEFAULT '0' COMMENT '固定',
  `hide` tinyint(1) NOT NULL DEFAULT '0' COMMENT '隐藏',
  `label` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '名称',
  `prop` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '字段',
  `sortable` tinyint(1) NOT NULL DEFAULT '0' COMMENT '排序',
  `width` int NOT NULL DEFAULT '80' COMMENT '宽度',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  `create_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `update_user_id` bigint NOT NULL DEFAULT '0' COMMENT '更新人ID',
  `update_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新日期',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '是否删除',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='模版表';

-- ----------------------------
-- Records of sys_table_column
-- ----------------------------
BEGIN;
INSERT INTO `sys_table_column` VALUES (3, 1, 1, '[]', 0, 0, 'ID', 'id', 0, 80, 1, '2021-11-23 20:37:56', 0, '2021-11-23 20:37:56', 0);
INSERT INTO `sys_table_column` VALUES (4, 1, 1, '[{\"text\":\"未上传\",\"value\":\"0\"},{\"text\":\"已上传\",\"value\":\"1\"}]', 0, 0, '头像', 'avatar', 0, 80, 1, '2021-11-23 20:37:56', 0, '2021-11-23 20:37:56', 0);
INSERT INTO `sys_table_column` VALUES (5, 1, 1, '[]', 0, 0, '登录账号', 'userName', 0, 150, 1, '2021-11-23 20:37:56', 0, '2021-11-23 20:37:56', 0);
INSERT INTO `sys_table_column` VALUES (6, 1, 1, '[]', 0, 0, '姓名', 'name', 0, 80, 1, '2021-11-23 20:37:56', 0, '2021-11-23 20:37:56', 0);
INSERT INTO `sys_table_column` VALUES (7, 1, 1, '[]', 0, 0, '加入时间', 'date', 0, 80, 1, '2021-11-23 20:37:56', 0, '2021-11-23 20:37:56', 0);
COMMIT;

-- ----------------------------
-- Table structure for sys_template
-- ----------------------------
DROP TABLE IF EXISTS `sys_template`;
CREATE TABLE `sys_template` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  `create_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `update_user_id` bigint NOT NULL DEFAULT '0' COMMENT '更新人ID',
  `update_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新日期',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '是否删除',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='模版表';

-- ----------------------------
-- Records of sys_template
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sys_user
-- ----------------------------
DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `avatar` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '头像',
  `user_name` varchar(50) COLLATE utf8mb4_general_ci NOT NULL COMMENT '登录账号',
  `password` varchar(100) COLLATE utf8mb4_general_ci NOT NULL COMMENT '登录密码',
  `name` varchar(50) COLLATE utf8mb4_general_ci NOT NULL COMMENT '姓名',
  `sex` int NOT NULL DEFAULT '0' COMMENT '性别',
  `mail` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '邮件地址',
  `about` text COLLATE utf8mb4_general_ci COMMENT '个性签名',
  `birthday` date DEFAULT NULL COMMENT '生日',
  `last_login_time` datetime DEFAULT NULL COMMENT '最后登录时间',
  `last_login_ip` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '最后登录IP',
  `create_user_id` bigint NOT NULL COMMENT '创建人ID',
  `create_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `update_user_id` bigint NOT NULL DEFAULT '0' COMMENT '更新人ID',
  `update_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新日期',
  `is_delete` int NOT NULL DEFAULT '0' COMMENT '是否删除',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `user_name` (`user_name`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of sys_user
-- ----------------------------
BEGIN;
INSERT INTO `sys_user` VALUES (1, NULL, 'admin', '21232f297a57a5a743894a0e4a801fc3', 'Admin', 0, NULL, NULL, NULL, '2021-11-23 20:51:18', '192.168.0.105', 0, '2021-11-06 19:16:22', 0, '2021-11-06 19:16:22', 0);
COMMIT;

-- ----------------------------
-- Table structure for sys_user_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_role`;
CREATE TABLE `sys_user_role` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `user_id` bigint NOT NULL COMMENT '用户ID',
  `role_id` bigint NOT NULL COMMENT '角色ID',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='菜单接口权限';

-- ----------------------------
-- Records of sys_user_role
-- ----------------------------
BEGIN;
INSERT INTO `sys_user_role` VALUES (1, 1, 1);
COMMIT;

-- ----------------------------
-- View structure for sys_view_user_menu_id
-- ----------------------------
DROP VIEW IF EXISTS `sys_view_user_menu_id`;
CREATE ALGORITHM = UNDEFINED SQL SECURITY DEFINER VIEW `sys_view_user_menu_id` AS select `b`.`user_id` AS `user_id`,`c`.`menu_id` AS `menu_id` from ((`sys_role` `a` join `sys_user_role` `b` on((`a`.`id` = `b`.`role_id`))) join `sys_role_menu` `c` on((`a`.`id` = `c`.`role_id`))) where (`a`.`is_delete` = 0);

SET FOREIGN_KEY_CHECKS = 1;
